home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / architecture / i386 / alignment.h next >
Text File  |  1992-09-17  |  771b  |  43 lines

  1. /*
  2.  * Copyright (c) 1992 NeXT Computer, Inc.
  3.  *
  4.  * Natural alignment of shorts and longs (for i386)
  5.  *
  6.  * HISTORY
  7.  *
  8.  * 2 Sept 1992 Brian Raymor at NeXT
  9.  *      Moved over to architecture.
  10.  * 18 August 1992 Jack Greenfield at NeXT
  11.  *    Created.
  12.  */
  13.  
  14. /*
  15.  * NOP
  16.  */
  17. __inline__ static unsigned short
  18. get_align_short(void *ivalue)
  19. {
  20.     return *((unsigned short *) ivalue);
  21. }
  22.  
  23. __inline__ static unsigned short 
  24. put_align_short(unsigned short ivalue, void *ovalue)
  25. {
  26.     return *((unsigned short *) ovalue) = ivalue;
  27. }
  28.  
  29. /*
  30.  * NOP
  31.  */
  32. __inline__ static unsigned long
  33. get_align_long(void *ivalue)
  34. {
  35.     return *((unsigned long *) ivalue);
  36. }
  37.  
  38. __inline__ static unsigned long 
  39. put_align_long(unsigned long ivalue, void *ovalue)
  40. {
  41.     return *((unsigned long *) ovalue) = ivalue;
  42. }
  43.